.Dd April 17, 2019
.Dt libmdmp 3
.Os libmdmp
.Sh NAME
.Nm libmdmp.h
.Nd Library to access the Windows Minidump (MDMP) format
.Sh SYNOPSIS
.In libmdmp.h
.Pp
Support functions
.Ft const char *
.Fn libmdmp_get_version "void"
.Ft int
.Fn libmdmp_get_access_flags_read "void"
.Ft int
.Fn libmdmp_get_codepage "int *codepage" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_set_codepage "int codepage" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_check_file_signature "const char *filename" "libmdmp_error_t **error"
.Pp
Available when compiled with wide character string support:
.Ft int
.Fn libmdmp_check_file_signature_wide "const wchar_t *filename" "libmdmp_error_t **error"
.Pp
Available when compiled with libbfio support:
.Ft int
.Fn libmdmp_check_file_signature_file_io_handle "libbfio_handle_t *file_io_handle" "libmdmp_error_t **error"
.Pp
Notify functions
.Ft void
.Fn libmdmp_notify_set_verbose "int verbose"
.Ft int
.Fn libmdmp_notify_set_stream "FILE *stream" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_notify_stream_open "const char *filename" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_notify_stream_close "libmdmp_error_t **error"
.Pp
Error functions
.Ft void
.Fn libmdmp_error_free "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_error_fprint "libmdmp_error_t *error" "FILE *stream"
.Ft int
.Fn libmdmp_error_sprint "libmdmp_error_t *error" "char *string" "size_t size"
.Ft int
.Fn libmdmp_error_backtrace_fprint "libmdmp_error_t *error" "FILE *stream"
.Ft int
.Fn libmdmp_error_backtrace_sprint "libmdmp_error_t *error" "char *string" "size_t size"
.Pp
File functions
.Ft int
.Fn libmdmp_file_initialize "libmdmp_file_t **file" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_file_free "libmdmp_file_t **file" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_file_signal_abort "libmdmp_file_t *file" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_file_open "libmdmp_file_t *file" "const char *filename" "int access_flags" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_file_close "libmdmp_file_t *file" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_file_get_number_of_streams "libmdmp_file_t *file" "int *number_of_streams" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_file_get_stream "libmdmp_file_t *file" "int stream_index" "libmdmp_stream_t **stream" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_file_get_stream_by_type "libmdmp_file_t *file" "uint32_t stream_type" "libmdmp_stream_t **stream" "libmdmp_error_t **error"
.Pp
Available when compiled with wide character string support:
.Ft int
.Fn libmdmp_file_open_wide "libmdmp_file_t *file" "const wchar_t *filename" "int access_flags" "libmdmp_error_t **error"
.Pp
Available when compiled with libbfio support:
.Ft int
.Fn libmdmp_file_open_file_io_handle "libmdmp_file_t *file" "libbfio_handle_t *file_io_handle" "int access_flags" "libmdmp_error_t **error"
.Pp
Stream functions
.Ft int
.Fn libmdmp_stream_free "libmdmp_stream_t **stream" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_stream_get_type "libmdmp_stream_t *stream" "uint32_t *type" "libmdmp_error_t **error"
.Ft ssize_t
.Fn libmdmp_stream_read_buffer "libmdmp_stream_t *stream" "void *buffer" "size_t buffer_size" "libmdmp_error_t **error"
.Ft ssize_t
.Fn libmdmp_stream_read_buffer_at_offset "libmdmp_stream_t *stream" "void *buffer" "size_t buffer_size" "off64_t offset" "libmdmp_error_t **error"
.Ft off64_t
.Fn libmdmp_stream_seek_offset "libmdmp_stream_t *stream" "off64_t offset" "int whence" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_stream_get_offset "libmdmp_stream_t *stream" "off64_t *offset" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_stream_get_size "libmdmp_stream_t *stream" "size64_t *size" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_stream_get_start_offset "libmdmp_stream_t *stream" "off64_t *start_offset" "libmdmp_error_t **error"
.Ft int
.Fn libmdmp_stream_get_virtual_address "libmdmp_stream_t *stream" "uint32_t *virtual_address" "libmdmp_error_t **error"
.Pp
Available when compiled with libbfio support:
.Ft int
.Fn libmdmp_stream_get_data_file_io_handle "libmdmp_stream_t *stream" "libbfio_handle_t **file_io_handle" "libmdmp_error_t **error"
.Sh DESCRIPTION
The
.Fn libmdmp_get_version
function is used to retrieve the library version.
.Sh RETURN VALUES
Most of the functions return NULL or \-1 on error, dependent on the return type.
For the actual return values see "libmdmp.h".
.Sh ENVIRONMENT
None
.Sh FILES
None
.Sh NOTES
libmdmp can be compiled with wide character support (wchar_t).
.sp
To compile libmdmp with wide character support use:
.Ar ./configure --enable-wide-character-type=yes
 or define:
.Ar _UNICODE
 or
.Ar UNICODE
 during compilation.
.sp
.Ar LIBMDMP_WIDE_CHARACTER_TYPE
 in libmdmp/features.h can be used to determine if libmdmp was compiled with wide character support.
.Sh BUGS
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libmdmp/issues
.Sh AUTHOR
These man pages are generated from "libmdmp.h".
.Sh COPYRIGHT
Copyright (C) 2014-2019, Joachim Metz <joachim.metz@gmail.com>.
.sp
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.Sh SEE ALSO
the libmdmp.h include file
